/**
 *                            License
 * THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS  
 * CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). 
 * THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW.  
 * ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR  
 * COPYRIGHT LAW IS PROHIBITED.
 * 
 * BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND  
 * AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE  
 * MAY BE CONSIDERED TO BE A CONTRACT,
 * THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED 
 * HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
 * 
 */
package com.lineage.server.random;

import java.util.Random;

/**
 * Class <code>StandardRandom</code> StandardRandom 类的实例.
 * 产生了一系列使用<code>java.util.Random</code>的类的伪随机数。类使用一个48位的种子，使用线性同余修改。
 * 如需了解更多信息 请参阅 Donald Knuth 著『The Art of Computer Programming, Volume 3』的3.2.1
 * 
 * @author jrwz
 * @version 2012-7-13下午04:08:51
 * @see java.util.Random
 * @since JDK1.7
 */
public final class StandardRandom implements RandomGenerator {
    /** 随机数. */
    private final Random rnd = new Random();

    @Override
    public int nextInt() {
        return this.rnd.nextInt();
    }

    @Override
    public int nextInt(final int n) {
        return this.rnd.nextInt(n);
    }
}
